<template>
  <el-dialog :title="title"  :visible.sync="show"
  @close="close"
  >
    <slot name="content"></slot>
    <div slot="footer" class="dialog-footer">
            <slot name="foot"></slot>
     </div>
        
   

</el-dialog>
</template>

<script>
  export default {
      data() {
          return {
              show:false
          }
      },
    props:{
        showpop:Boolean,
        title:String
    },
    methods: {
        close(){
            // console.log(this.show);
            this.$emit("close")
            this.$emit("refresh")
        }
    },
    watch:{
        showpop(){
            if(this.showpop){
                console.log(this.showpop,'121');
                this.show=true
            }else{
                  console.log(this.showpop,"点击关闭按钮");
                this.show =false
            }
        }
    }
  };
</script>

<style lang="less">
    .el-dialog__header{
        height: 100px;
        // background: red;
        padding: 0;
        position: relative;
        height: 24px;
        .el-dialog__title{
            position: absolute;
            top: 0;
            left: 0;
            color: #848484;
            background: #f8f8f8;
            width: 100%;
            font-size: 15px;
        }
        .el-dialog__headerbtn{
            position: absolute;
            top: 5px;
            right: 5px;
        }
    }
    .el-dialog__footer{
        position: relative;
        width: 100%;
        height: 100px;
        padding: 0;
        // background: red;
    }
</style>